<?php
/*
 *用户的日志管理
 *author 王建 
 */

class MemberlogAction extends BaseAction{
	public $d = '';
	function __construct(){
		parent::__construct();
		$this->d = D("Admin/Memberlog");;
	}
	function index(){
		$action = $this->_request("action");	
		$action_array = array("show","ajax_data" );
		$action = !in_array($action,$action_array)?'show':$action ;
		if($action == 'show'){
			$this->display();
		}elseif($action == 'ajax_data'){
			$this->ajax_data();
		}
	}
	//ajax get data
	private function ajax_data(){
		$page = intval($this->_request("page"  ));
		$list = $this->d->queryMemberLog($page ,100 , 
				array(
							'username'=>trim($this->_request("username")) ,
							'phone'=>trim($this->_request("phone")) ,
							'uid'=>trim($this->_request("uid")) ,
						) );

		echo result_to_towf_new($list['list'], 1, '成功', $list['page_string']) ;
	}
	
}